This invention relates to machine vision, and particularly to methods and apparatuses for processing images.
Many machine vision systems use geometric descriptions as canonical models for inspecting or recognizing objects within images. A geometrical description is a collection of data that specifies the basic geometry of the object, that is the location of object features and dimensions of object features relative to each other. The features might include the object body, the number of extensions, or the number of lead sets, for instance.
The machine-vision system can use a geometrical model to locate an instance of an object in an image and align the object in the proper orientation (i.e., register the object). For example, a vision-based automatic surface mounter (SMD) machine typically employs a geometrical-based model of leaded objects to accurately inspect and place leaded objects on a printed circuit board (PCB). A leaded object 900 is an electronic component that has an object body 902 and leads 904, an example of which is depicted in FIG. 9, which is discussed more fully with reference to FIG. 8 hereinafter. The SMD machine places the leaded objects by registering the leaded object 900 with pads on the PCB, such that the centers of feet 906 of the leaded object 900 align with the centers of pads on the PCB within positional tolerances.
The process of creating accurate geometrical-based models of objects, either by manually measuring the dimensions of the object, or by extracting the dimensions from manufacturing specifications, can be very tedious, especially when the objects are complicated.
Not only is the creation of the geometrical description difficult, the task must be repeated for each object in a product; this makes changeover to new products on an assembly line very slow. For example, in addition to the surface mount leaded objects and through-hole leaded objects there are many types of ball grid array components, chips and all sorts of complicated odd-form objects, such as coils and connectors. A ball grid array is a surface-mount device consisting of a more-or-less rectangular package and a grid of balls. Further, new objects are continually being introduced. Therefore, a prior geometrical description cannot be reused without modification.
An alternative approach useful for some applications is to create featural models rather than models based on geometrical descriptions. A featural model describes the two-dimensional spatial arrangement of features, such as edges or corners, that constitute the appearance of an object. Featural models, however, require a large amount of processing memory, and an operator looking at the object cannot easily verify the correctness of featural models.
This invention provides methods and apparatuses for generating a model of an object from an image of the object. First, an orientation of the object in the image is determined. Thereafter, the orientation is used to gauge the object. The gauging provides the necessary dimensional information that becomes a part of the geometrical model of the object.
The orientation of the object is determined in two phases. First, a two-dimensional frequency response of the image, or portion thereof, is determined, and, preferably, represented in a frequency space, such as a two-dimensional plot or a frequency image, for example. Second, the frequency space is evaluated to determine an orientation of a spatial pattern therein. The invention recognizes, among other things, that the orientation of the spatial pattern within the frequency space is related to, and often equals, the orientation of the object in the image. More generally, the invention recognizes the frequency response of an image, or portion thereof, contains information about the orientation of objects in the image.
Further, the invention recognizes that once the frequency response, or portion thereof, is represented two dimensionally in a frequency space, whether plotted or within a frequency image, for example, and the frequency response, or portion thereof is preferably scaled to enhance the high frequencies, the orientation information is easily obtained from the frequency space using a variety of algorithms.
In one embodiment, the method segments regions of features on the object from the rest of the image before gauging the features. Optionally, the segmentation of the regions is accomplished using the orientation of the object. For example, in one embodiment, the orientation of a leaded object is used to segment the lead sets and gauge the leads with edge detection and calipers. The dimensional information produced is used to generate the geometrical description.
In further aspects, the regions of features, once segmented and/or gauged, are checked against validity norms, to determine whether the regions can be regions that contain features, where such checking includes: checking the area, shape, and/or number of regions, for example. Discarding regions that do not conform to validity norms saves time and/or often enhances the accuracy of the geometrical model.
The invention recognizes, among others, that the angle of the object can be used to segment regions and/or gauge the features of the object so that a geometrical model of the object can be created from an image of the object.
One of the advantages of the invention is that only easily obtainable input, an image of the object, is required from an operator, while the invention determines the difficult parameters of the geometrical description. Another advantage is that an operator""s involvement is minimized and models can often be automatically generated from an image, saving time and enhancing accuracy. A further advantage of the invention is that it can be used over a wide range of objects.
In further aspects, the invention provides an apparatus in accord with the methods described above. The aforementioned and other aspects of the invention are evident in the drawings and in the description that follows.